package com.example;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;


@ControllerAdvice
public class ExceptionControllerAdvice {

    @ExceptionHandler
    @ResponseBody
    public ResultInfo errorDto(Exception e) {
        return new ResultInfo(e.getMessage());
    }
}
